/* 定义CSS变量 */
:root {
    --primary-color: #28a745;
    --primary-hover-color: #218838;
    --background-color: #f4f4f4;
    --container-bg-color: white;
    --border-color: #ccc;
    --error-color: red;
    --available-seat-color: #c6e48b;
    --booked-seat-color: #f2dede;
    --hover-seat-color: #a8d97a;
    --font-family: Arial, sans-serif;
    --font-size: 16px;
    --border-radius: 4px;
    --transition-duration: 0.3s;
}

/* 全局样式 */
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 600px;
    width: 100%;
    padding: 20px;
    background-color: var(--container-bg-color);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 表单样式 */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: bold;
    color: #333;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size);
    transition: border-color var(--transition-duration);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size);
    cursor: pointer;
    transition: background-color var(--transition-duration);
}

button:hover {
    background-color: var(--primary-hover-color);
}

.error {
    color: var(--error-color);
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* 座位样式 */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.seat {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition-duration);
}

.seat.available {
    background-color: var(--available-seat-color);
}

.seat.booked {
    background-color: var(--booked-seat-color);
    cursor: not-allowed;
}

.seat:hover:not(.booked) {
    background-color: var(--hover-seat-color);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .seat-grid {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    }

    .seat {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
}